package com.hitqz.robot.api.business.model.vo.patrol;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Objects;

/**
 * @author wengyx
 * @date 2024/8/7
 * 检测标准
 */
@Schema(description = "巡检对象标准值")
public class PatrolObjectStandardVo {
    @Schema(description = "id")
    private Long id;
    @Schema(description = "巡检对象id")
    private Long patrolObjectId;
    @Schema(description = "判断类型 1-值判定 2-区间")
    private String type;
    @Schema(description = "判断类型显示文本")
    private String typeStr;
    @Schema(description = "正常值,示例：值判定填具体枚举值如 1 多个则逗号隔开.区间填范围逗号左边为下限右边为上限如 20,30")
    private String standardValue;
    @Schema(description = "是否需要声音告警 0-否 1-是")
    private Integer isVoice;
    @Schema(description = "音频文件地址")
    private String voiceUrl;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPatrolObjectId() {
        return patrolObjectId;
    }

    public void setPatrolObjectId(Long patrolObjectId) {
        this.patrolObjectId = patrolObjectId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStandardValue() {
        return standardValue;
    }

    public void setStandardValue(String standardValue) {
        this.standardValue = standardValue;
    }

    public Integer getIsVoice() {
        return isVoice;
    }

    public void setIsVoice(Integer isVoice) {
        this.isVoice = isVoice;
    }

    public String getVoiceUrl() {
        return voiceUrl;
    }

    public void setVoiceUrl(String voiceUrl) {
        this.voiceUrl = voiceUrl;
    }

    public String getTypeStr() {
        if (Objects.equals(type, "1")) {
            return "值判定";
        }
        if (Objects.equals(type, "2")) {
            return "区间";
        }
        return typeStr;
    }

    public void setTypeStr(String typeStr) {
        this.typeStr = typeStr;
    }
}
